The present invention relates generally to communication between application programs in a multitasking environment such as the MICROSOFT WINDOWS operating system environment. (xe2x80x9cMICROSOFTxe2x80x9d and xe2x80x9cWINDOWSxe2x80x9d are registered trademarks of Microsoft Corporation). More particularly, the invention relates to a universal communication mechanism that allows computer-implemented applications of potentially dissimilar memory addressing modes to share information with one another in a convenient fashion, and without requiring each application to know the addressing mode of the other in order to share information such as messages and data. In its presently preferred form, the invention is implemented as a WINDOWS virtual device driver (Vxc3x97D) that applications can access through standard API function calls to effect the desired inter-application communication transparently.
For largely historic reasons the MICROSOFT WINDOWS operating system supports several different addressing modes. On a machine based around the Intel 80386 processor with at least 8 megabytes of memory, WINDOWS 3.x (WINDOWS 3.1 and WINDOWS For Workgroups) runs in the ""386 enhanced mode. In the enhanced mode the WINDOWS operating system can support both 16 bit and 32 bit WINDOWS applications and DOS applications. The DOS applications run in the xe2x80x9cvirtual-86xe2x80x9d mode of the microprocessor. Before the advent of the WINDOWS 3.x operating system, most application programs for the IBM-PC and PC compatibles were DOS programs that were, by design, constrained to operate within a 640K memory space. The virtual-86 mode of the ""386 processor can simultaneously mimic one or more virtual DOS machines, ILO allowing one or more DOS applications to load concurrently and independently of one another. The virtual-86 mode permits each DOS application to have its own memory space, which appears to the DOS application as if it has the entire use of a conventional DOS machine. With the advent of the WINDOWS 95 operating system, a 32 bit memory mode has been added to the palette of addressing mode choices that a program may have.
The available addressing modes (virtual-86 mode, WINDOWS 16 bit mode, and WINDOWS 32 bit mode) are fundamentally incompatible with one another. The virtual-86 mode is based on the standard segmented memory architecture of the INTEL microprocessor family. (INTEL is a registered trademark of Intel Corporation.) A 20 bit address is calculated by a particular merging of two 16 bit values, a segment value and an offset value. Through this addressing mode, an application program can access a 1 megabyte memory space. Its combination with the offset value results in a 20 bit address.
The WINDOWS 16 bit addressing mode differs from the virtual-86 mode in several respects. First, although two separate values are used to generate a linear address, the segment value (called the xe2x80x9cselectorxe2x80x9d value in this mode) does not represent a linear memory address. Rather, it represents an offset into a xe2x80x9cdescriptor tablexe2x80x9d that provides a 32 bit base address in linear memory. The offset address is then added to the base address to generate a 32 bit address. In this way, the WINDOWS 16 bit addressing mode can access up to 16 megabytes of linear (virtual) memory.
The WINDOWS 32 bit addressing mode is different still. The 32 bit address is simply the flat concatenation of two 16 bit words producing a 32 bit linear address.
As software tasks become more complex, multitasking software solutions become more and more attractive. There are many software tasks that could be advantageously solved by allocating different aspects of the task to different concurrently running applications that are each specially configured to handle a portion of the task. In the present MICROSOFT WINDOWS environment such division of labor would conventionally be accomplished by multiple applications of the same addressing mode. Being of the same addressing mode allows the multiple WINDOWS applications to share information with one another by directly accessing the memory space of the other. However, DOS applications (virtual-86) each have their own address space and thus cannot share information by directly accessing the memory space of the other.
It has not been heretofore convenient for multiple applications of different addressing modes to communicate with one another in this fashion. For applications of different memory addressing modes to communicate directly with one another it has been heretofore necessary to specifically configure the applications to be able to determine the addressing mode of its communicating partner in order to address the memory of that partner using the correct addressing mode. This would, for example, require existing application programs to be extensively rewritten or modified before they can support communication with other application programs.
The present invention provides a universal communication mechanism that allows application programs of different memory addressing modes to communicate with one another, even if they do not know the addressing mode of the other. More specifically, the invention provides a communication mechanism for passing information within an operating system environment between computer-implemented applications running in the environment that employ different memory addressing modes. The communication mechanism comprises a device driver that is coupled to the operating system environment and that provides an application program interface for communicating with the applications through a set of predefined function calls. The device driver has a message handler that is responsive to these function calls. The device driver includes a message buffer for establishing buffered communication between the s ending application and the receiving application. A mapping mechanism determines the addressing mode of the sending application and translates the addressing mode of th e sending application into a predefined addressing mode. This mapping mechanism is used by a message transfer mechanism that copies the message from the sending application into the message buffer. The message transfer mechanism then signals the receiving application to ask the driver to copy the message being communicated to the receiving application""s buffer. In this way a copy of the message being communicated is passed from sending application to receiving application without requiring the receiving application to know the addressing mode of the sending application.
For a more complete understanding of the invention, its objects and advantages, refer to the following specification and to the accompanying drawings.